package cn.car.carguanli.controller;

import cn.car.carguanli.pojo.CarCd;
import cn.car.carguanli.service.CarService;
import cn.car.carguanli.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("care")
public class CarController {
    @Autowired
    private CarService carService;
    /**
     * 查看所有车辆对应的队伍和组聘人,拥有者,所属公司
     *
     */
    @RequestMapping("getCareAll")
    public Result getCareAll(){
        try {
            CarCd carCd=carService.selectCareAll();
            return new Result(200,"查询成功",carCd);
        } catch (Exception e) {
            return new Result(500,"查询失败",null);
        }
    }
}
